package com.yunji.cabinet.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.yunji.cabinet.bo.TemplateCellResetBO;
import com.yunji.cabinet.domain.CabinetTemplateCellDO;
import org.apache.ibatis.annotations.Select;


/**
 * @version 1.0
 * @Project: yunji-coffee
 * @Package com.yunji.cabinet.mapper
 * @FileName CabinetTemplateCellMapper.java
 * @Copyright Copyright © 2024 云集互联. All Rights Reserved
 * Company		com
 * @CreateTime 2024-04-07 17:02:39
 * @Description 货柜模板格子数据交互
 * @Modification Author                    History Time			Version				Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-04-07 17:02:39		1.0					1.0 Version
 * @since JDK 1.8.0_202
 */
public interface CabinetTemplateCellMapper extends MPJBaseMapper<CabinetTemplateCellDO> {
    @Select(" <script>     UPDATE" +
            "        template_cell" +
            "        <set>" +
            "            <if test=\"productId != null\">product_id = null ,</if>" +
            "        </set>" +
            "        WHERE" +
            "        `status` = 0" +
            "        AND cell_id = #{cellId} </script>")
    int resetCell(TemplateCellResetBO cell);
}
